import numpy as np
import matplotlib.pyplot as plt
# x:-10-10平均分为100个数
x = np.linspace(-10,10,100)
# 根据x算出y
y = np.sin(x) + np.sin(2*x)
# 绘制线图
plt.plot(x,y)
plt.show()